/*
Navicat MySQL Data Transfer

Source Server         : mysql
Source Server Version : 50716
Source Host           : localhost:3306
Source Database       : thinkphp

Target Server Type    : MYSQL
Target Server Version : 50716
File Encoding         : 65001

Date: 2017-12-21 14:28:50
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for think_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_group`;
CREATE TABLE `think_auth_group` (
`id`  mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT ,
`title`  char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`status`  tinyint(1) NOT NULL DEFAULT 1 ,
`rules`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=12

;

-- ----------------------------
-- Records of think_auth_group
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_group` VALUES ('1', '超级管理', '1', '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23'), ('2', '管理', '1', '1,2,3,4,5,9,10,14,23'), ('3', '用户', '1', '1,3,4,5,9');
COMMIT;

-- ----------------------------
-- Table structure for think_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_group_access`;
CREATE TABLE `think_auth_group_access` (
`uid`  mediumint(8) UNSIGNED NOT NULL ,
`group_id`  mediumint(8) UNSIGNED NOT NULL ,
UNIQUE INDEX `uid_group_id` (`uid`, `group_id`) USING BTREE ,
INDEX `uid` (`uid`) USING BTREE ,
INDEX `group_id` (`group_id`) USING BTREE 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci

;

-- ----------------------------
-- Records of think_auth_group_access
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_group_access` VALUES ('1', '1'), ('2', '2'), ('3', '2'), ('4', '2'), ('5', '2'), ('6', '3'), ('7', '2'), ('8', '3'), ('9', '3'), ('10', '3'), ('11', '3'), ('12', '3'), ('13', '3'), ('14', '3'), ('15', '3'), ('16', '1'), ('17', '3');
COMMIT;

-- ----------------------------
-- Table structure for think_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_rule`;
CREATE TABLE `think_auth_rule` (
`id`  mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`title`  char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`type`  tinyint(1) NOT NULL DEFAULT 1 ,
`status`  tinyint(1) NOT NULL DEFAULT 1 ,
`condition`  char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`pid`  int(11) NULL DEFAULT NULL ,
`is_menu`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`),
UNIQUE INDEX `name` (`name`) USING BTREE 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=24

;

-- ----------------------------
-- Records of think_auth_rule
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_rule` VALUES ('3', 'home/user/myself', '个人信息', '1', '1', '', '1', '1'), ('4', 'home/user/update', '修改密码', '1', '1', '', '1', '1'), ('5', 'home/user/lists', '用户管理', '1', '1', '', '2', '1'), ('6', 'home/user/roles', '角色管理', '1', '1', '', '2', '1'), ('7', 'home/user/auth', '权限管理', '1', '1', '', '2', '1'), ('9', 'home/user/myselfup', '编辑个人', '1', '1', '', '3', '2'), ('8', 'home/user/test', '测试', '1', '1', '', '5', '0'), ('11', 'home/user/rolesitem', '角色表', '1', '1', '', '6', '0'), ('12', 'home/user/authitem', '权限表', '1', '1', '', '7', '0'), ('10', 'home/user/serverlist', '用户表', '1', '1', '', '5', '0'), ('13', 'home/user/dele', '删除角色', '1', '1', '', '6', '0'), ('14', 'home/user/delete', '删除用户', '1', '1', '', '5', '0'), ('15', 'home/user/rolesuser', '角色的用户', '1', '1', '', '6', '0'), ('16', 'home/user/authrules', '角色的权限', '1', '1', '', '7', '0'), ('18', 'home/user/authshou', '授权表', '1', '1', '', '7', '0'), ('1', 'home/user/index', '用户信息', '1', '1', '', '0', '1'), ('2', '', '系统管理', '1', '1', '', '0', '1'), ('19', 'home/user/shouadd', '添加授权', '1', '1', '', '7', '0'), ('20', 'home/user/shoudele', '减少授权', '1', '1', '', '7', '0'), ('21', 'home/user/ruleadd', '添加角色', '1', '1', '', '6', '0'), ('22', 'home/user/ruleuser', '角色用户表', '1', '1', '', '6', '0'), ('23', 'home/user/rlist', '获取职位列表', '1', '1', '', null, null);
COMMIT;

-- ----------------------------
-- Table structure for think_user
-- ----------------------------
DROP TABLE IF EXISTS `think_user`;
CREATE TABLE `think_user` (
`uid`  int(5) NOT NULL AUTO_INCREMENT ,
`uname`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`nickname`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`password`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`email`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`address`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`role`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`phone`  varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`birthday`  datetime NULL DEFAULT CURRENT_TIMESTAMP ,
PRIMARY KEY (`uid`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=17

;

-- ----------------------------
-- Records of think_user
-- ----------------------------
BEGIN;
INSERT INTO `think_user` VALUES ('1', 'zhangsan', '张三', '111111', '1512@qq.com', '北京', '超级管理', '13548781135', '2017-12-08 00:00:00'), ('2', 'mei', '李四', 'mei123', '151589@qq.com', '北京', '管理', '1254698758', '1990-12-13 00:00:00'), ('3', 'jing', '王五', 'jing123', '1251512@qq.com', '上海', '管理', '13548781135', '1990-05-12 00:00:00'), ('4', 'zhao', '赵六', 'zhao123', '1587@qq.com', '江苏', '管理', null, '1987-05-18 00:00:00'), ('5', 'qian', '钱七', 'qian123', '0125@qq.com', '南京', '管理', null, null), ('6', '2141', '周八', '14123213', '15426@qq.com', '广州', '用户', null, null), ('7', 'sun', '凤九', 'sun123', '89546@qq.com', '湖北', '用户', null, null), ('8', 'li', '严十', 'li123', '120215@qq.com', '福建', '用户', null, null), ('9', 'zhou', '十一', 'zhou123', '021548@qq.com', '甘肃', '用户', '', '2017-06-08 00:00:00'), ('10', 'wu', '武士', 'wu123', '11021546@qq.com', '天津', '用户', '18722507094', '2017-12-01 00:00:00'), ('11', 'zheng', '十三', 'zheng123', '158462@qq.com', '陕西', '用户', null, null), ('12', 'wang', '十四', 'wang123', '02153@qq.com', '山西', '用户', null, null), ('13', 'feng', '十五', 'feng123', '984715@qq.com', '山东', '用户', null, null), ('14', 'chen', '刘二', 'chen123', '54821@qq.com', '河南', '用户', null, null), ('15', 'zhu', '胡七', 'zhu123', '012156@qq.com', '河北', '用户', null, null), ('16', 'wei', '林九', 'wei123', '011546@qq.com', '浙江', '用户', null, null);
COMMIT;

-- ----------------------------
-- Auto increment value for think_auth_group
-- ----------------------------
ALTER TABLE `think_auth_group` AUTO_INCREMENT=12;

-- ----------------------------
-- Auto increment value for think_auth_rule
-- ----------------------------
ALTER TABLE `think_auth_rule` AUTO_INCREMENT=24;

-- ----------------------------
-- Auto increment value for think_user
-- ----------------------------
ALTER TABLE `think_user` AUTO_INCREMENT=17;
